package univ.orleans.m2.inis.san.tp22102012.ex1;

import android.os.Bundle;
import android.app.Activity;
import android.util.Log;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class SecondActivity extends Activity {

    private Button btn_second_activity;

    final static String TAG = SecondActivity.class.getName();
    
	@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_second);
        
    	btn_second_activity = (Button) findViewById(R.id.btn_second_activity);
    	btn_second_activity.setOnClickListener(
    			new OnClickListener() {
    				@Override
					public void onClick(View v) {
    					finish();
    				}
    			});
    	
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.activity_second, menu);
        return true;
    }
    
    @Override
    protected void onDestroy() {
    	super.onDestroy();
    	Log.i(SecondActivity.TAG,"onDestroy");
    }
    
    @Override
    protected void onStart() {
    	super.onStart();
    	Log.i(SecondActivity.TAG,"onStart");
    }
    
    @Override
    protected void onStop() {
    	super.onStop();
    	Log.i(SecondActivity.TAG,"onStop");
    }
    
}
